﻿<div class="success" data-bind="text: insertCommentMessage">
</div>
<div data-bind="visible: showForm">
    <div class="commentForm" data-bind="with: insertCommentModel">
        <fieldset>
            <legend>Your comment</legend>
            <input type="hidden" name="fileId" data-bind="value: fileId" />
            <div class="error" data-bind="html: errorMessage">
            </div>
            <div>
                <input type="text" placeholder="Your name" style="width: 150px" name="name" data-bind="value: name, enable: !isAuthor()" />
                Name (required)
            </div>
            <div>
                <input type="text" placeholder="Your name" style="width: 150px" name="url" data-bind="value: url, enable: !isAuthor()" />
                Blog
            </div>
            <div>
                <textarea name="comment" data-bind="value: comment" rows="10" cols="60" placeholder="Your comment"></textarea>
            </div>
            <div>
                <input type="button" data-bind="click: addComment" value="Post comment" />
                <input type="button" data-bind="click: closeComment" value="Close" />
            </div>
        </fieldset>
    </div>
</div>
<div data-bind="visible: showComments">
    @Html.Partial("CommentListControl")
</div>


